System, method, and computer program for automatic coupon code fill in a mobile application

ABSTRACT

The present disclosure relates to a system, method, and computer program for automatic coupon code fill in a mobile application. The system identifies a checkout page in a WebView of a mobile application and extracts field data from the checkout page. The system identifies a coupon code field and a cart total field from the field data. The system obtains one or more coupon code(s) and tests the one or more coupon code(s) in the checkout page. The one or more coupon code(s) are tested in the identified coupon code field to determine whether any of the coupon code(s) cause the value associated with the cart total field to decrease. In response to one or more coupon code(s) providing a reward on the checkout page, the system identifies a best coupon code, which it inserts in the identified coupon code field in the checkout page in the mobile application.

BACKGROUND OF THE INVENTION 1. Field of the Invention

This invention relates generally to mobile applications and, more specifically, to a system and method for automatic coupon code fill in a mobile application.

2. Description of the Background Art

E-commerce is an increasingly important method for consumers to purchase goods and services and may have overtaken brick-and-mortar stores as the dominant approach. Similar to brick-and-mortar stores, coupons and other rewards are a useful way to save money. Instead of clipping coupons to scan at the store, a consumer can now save coupon codes to his or her user profile. When purchasing a good or service, the consumer would then need to apply the coupon code(s) to his or her purchase on the merchant web site to determine which coupon code(s) would provide the largest reward.

A number of browser extensions are able to detect coupon code fields and test coupon codes on webpages. However, this functionality does not yet exist in mobile applications. This is because a mobile application has less control over web content viewed within the mobile application than a browser extension. As many transactions occur on the go by means of mobile applications, there is a need for a system and method for detecting and filling coupon codes in a mobile domain.

SUMMARY OF THE DISCLOSURE

The present disclosure describes a system, method, and computer program for automatic coupon code fill in a mobile application. The method is performed by a computer system that includes servers, storage systems, networks, operating systems, and databases.

A mobile application launches a software module for analyzing the WebView of a mobile application. The software module, which is injected into a webpage in the WebView, extracts field information from the WebView, and generates a results payload. This is done by identifying a checkout page in the WebView and extracting field data from the checkout page, which it then sends to the mobile application. In certain embodiments, the software module also gathers contextual data and metadata related to the fields and verifies that the field is visible to the mobile application user.

The mobile application sends the results payload to a mapping module on a server, which maps the fields to parameters. A parameter is a value assigned to a field that determines the field type. In such a way, the mapping module identifies a coupon code field and a cart total field from the field data.

The mapping module sends a mapping of the fields to parameters to the mobile application, which relays the mapping along with user profile data (including one or more coupon code(s)) to the software module. The software module tests the coupon code(s) in an iterative fashion by filling the coupon code field with each coupon code sequentially and identifying the best coupon code (i.e., the coupon code that provides the greatest reward in the cart total field), which it will then insert into the coupon code field in the checkout page in the mobile application.

In one embodiment, a method for automatic coupon code fill in a mobile application comprises the following steps:

-   -   identifying a checkout page in a WebView of a mobile         application;     -   extracting field data from the checkout page in the WebView of         the mobile application;     -   identifying a coupon code field and a cart total field from the         field data;     -   obtaining one or more coupon code(s);     -   testing one or more coupon code(s) in the checkout page in the         WebView of the mobile application, wherein the one or more         coupon code(s) are tested in the identified coupon code field to         determine whether any of the coupon code(s) cause the value         associated with the cart total field to decrease;     -   in response to one or more coupon code(s) providing a reward on         the checkout page, identifying a best coupon code; and     -   inserting the best coupon code in the identified coupon code         field in the checkout page in the mobile application.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a flowchart that illustrates a method, according to one embodiment, for automatic coupon code fill in a mobile application.

FIG. 2 is a block diagram that illustrates an example software architecture according to one embodiment.

FIG. 3 is a flowchart that illustrates methods, according to one embodiment, performed by one or more software module(s) within the system illustrated in FIG. 2 .

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

The present disclosure describes a system, method, and computer program for automatic coupon code fill in a mobile application. The method is performed by a computer system that includes servers, storage systems, networks, operating systems, and databases (“the system”).

The mobile application allows users to browse e-commerce websites, injects a software module on webpages in response to detecting a coupon code field, and interfaces with a mapping module to provide an automatic coupon code fill capacity. The system identifies a checkout page in a WebView of a mobile application and extracts field data from the checkout page. The system identifies a coupon code field and a cart total field from the field data. The system obtains one or more coupon code(s) and tests the one or more coupon code(s) in the checkout page. The one or more coupon code(s) are tested in the identified coupon code field to determine whether any of the coupon code(s) cause the value associated with the cart total field to decrease. In response to one or more coupon code(s) providing a reward (e.g., a cashback value, points, or other consumer benefit) on the checkout page, the system identifies a best coupon code, which it inserts in the identified coupon code field in the checkout page in the mobile application.

Example implementations of the method are described in more detail with respect to FIGS. 1-3 .

1. METHOD FOR AUTOMATIC COUPON CODE FILL IN A MOBILE APPLICATION

FIG. 1 illustrates a method for automatic coupon code fill in a mobile application. The system identifies a checkout page in a WebView of a mobile application (step 110). In certain embodiments, a cart scraper detects that it is on a checkout page by using both the URL and the elements on the page to see if either one matches a keyword from a defined list. For example, if the URL contains the keyword “cart” or “checkout,” the system determines that the page is a checkout page. If an element on the page has the keyword “checkout” or “total-price,” the system will likewise determine that the page is a checkout page. Along with this positive keyword identification, the system also uses a list of negative keywords (e.g., homepage). If either the URL or an element on the page contains a negative keyword, then the system determines that the page is not a checkout page (even if there was a positive keyword identification).

The system extracts field data from the checkout page in the WebView of the mobile application (step 120). In certain embodiments, extracting field data includes creating an object model of the webpage. The system searches for labels associated with the coupon code and cart total fields to identify potential coupon code and cart total fields, where the search is performed using the object model and the webpage. The system gathers contextual data around the identified fields, collects metadata for the identified fields, verifies the identified fields are visible to the user, and generates a payload with the contextual data and metadata for the identified fields. In certain embodiments, the metadata includes field metadata (e.g., HTML name, IDs, input type, etc.), inferred field metadata (e.g., a custom input type that is not HTML-compliant, labels deduced by the software module algorithm, etc.), page metadata (e.g., URL), and performance information.

The system identifies a coupon code field and a cart total field from the field data by mapping the field data to field parameters, including mapping a field to a coupon code parameter and a field to a cart total parameter (step 130). A field parameter is a value that indicates a field type. For example, a coupon code field on a webpage would be mapped to a “CouponCode” parameter. The parameter is used by the software module to fill in the relevant user values stored in the mobile application. In certain embodiments, identifying the coupon code and cart total fields includes creating a vector representation of each field in the field data, applying a neural network to the vector representations of the fields in the field data, and obtaining a predicted coupon code field and cart total field from the neural network. In certain embodiments, the system preprocesses the data (e.g., language translation) prior to mapping. In certain embodiment, the system post-processes the data to verify that the field is correctly mapped using various heuristics and contextual data.

In certain embodiments, the mapping process includes extracting metadata from the extracted field data from the checkout page. The system creates a payload of the metadata (e.g., in JSON) and uploads the payload of the metadata to a server. The system generates field parameters from the payload of the metadata using a heuristic approach, a machine-learning approach, or a combination of the two. The system then returns the field parameters as a results payload (e.g., in JSON).

The system obtains one or more coupon code(s) (step 140). In certain embodiments, the system can obtain a maximum number n of coupon code(s). The system tests all obtained coupon code(s) in the checkout page (i.e., in the field mapped to the coupon code parameter) in the WebView of the mobile application to determine if any coupon code(s) reduce the value associated with the cart total field (step 150). In certain embodiments, if there are multiple coupon codes, the system tests each coupon code in an iterative fashion by inserting each coupon code sequentially in the coupon code field and scraping the cart page to determine the reward provided in the cart total field. In certain embodiments, if a coupon code is displayed on a webpage, the user can copy the coupon code to his or her clipboard and the software module will automatically fill in the coupon code in the coupon code field. In certain embodiments, the cart total field is automatically updated upon entering the coupon code in the coupon code field. In certain embodiments, a user needs to perform an action (e.g., pressing a button) before the cart total field will be updated. In certain embodiments, the system displays the coupon code(s) being tested and the amount saved, if the coupon code is successful, in the mobile application user interface.

The system identifies a best coupon code (i.e., the coupon code in the coupon code field that provided the greatest reward in the cart total field) in response to one or more coupon code(s) reducing the cart total value (step 160). The system inserts the best coupon code in the coupon code field in the checkout page in the mobile application (step 170). In certain embodiments, the system displays an amount saved in the mobile application after inserting the best coupon code in the identified coupon code field.

In certain embodiments, the steps of identifying a checkout page, extracting field data, testing coupon codes, identifying a best coupon code, and inserting the best coupon code in the coupon code field are performed by a software module injected into the webpage in the WebView by the mobile application. In certain embodiments, the software module is a JavaScript code injected into the WebView to harvest field information, send the field information back to the mobile application for mapping, and populate the fields with user data from the mobile application. In certain embodiments, the software module generates a payload with the extracted field data, and the mobile application sends the payload to a server, which maps the field data in the payload to one or more field parameter(s), where a field parameter is a value that indicates a field type. In certain embodiments, the server returns the field parameter mappings to the mobile application, and the software module injected into the webpage uses the field parameter mappings to find the coupon code field on the webpage and test one or more coupon(s) in the coupon code field.

2. EXAMPLE SYSTEM ARCHITECTURE

FIG. 2 illustrates an example architecture for a system that performs the method described herein. However, the method described herein may be implemented in other systems and are not limited to the illustrated system. As seen in FIG. 2 , the system identifies a webpage (e.g., a checkout page) 220 within a WebView 230 of a mobile application 240. An autofill manager 250 launches a coupon field detection and fill module 260, which extracts field data (e.g., labels and headings) from the webpage 220 and generates a results payload. The results payload containing the field data is passed back to the autofill manager 250, which passes it via the internet to the mapping module 270 on a server 280. In certain embodiments, the mapping module is a cloud-hosted server backend that contains an autofill mapping algorithm and determines which values should be auto-filled into each form field. The mapping module 270 maps the field data to field parameters, including mapping a coupon code field to a coupon code parameter and a cart total field to a cart total parameter. In certain embodiments, the mapping of field data to field parameter is assigned a confidence score. The mapping module 270 passes the mapping (i.e., field data to field parameters) back to the autofill manager 250 of the mobile application 240.

The autofill manager 250 requests the mobile application logic 285 to obtain user profile data and one or more coupon code(s) from the user profile manager 290. The autofill manager 250 passes the mapping along with the user profile data and coupon code(s) to the coupon field detection and fill module 260, which tests the coupon code(s) in the field mapped to the coupon code parameter to determine if any coupon code(s) reduce the value associated with the field corresponding to the cart total. The coupon field detection and fill module 260 identifies a best coupon code in response to one or more coupon code(s) reducing the cart total value and inserts the best coupon code in the coupon code field in the webpage 220 in the mobile application 240.

FIG. 3 illustrates exemplary methods performed by one or more software module(s) within the system illustrated in FIG. 2 . More specifically, FIG. 3 illustrates the methods performed by the coupon field detection and fill module 260, the autofill manager 250, and the mapping module 270. The coupon field detection and fill module 260 handles two processes: payload generation and coupon test and fill.

Within the payload generation process, the coupon field detection and fill module 260 searches for relevant field parameters associated with the coupon code field (step 310). It creates an object model (step 315), which is an in-house representation of the webpage for further analysis. The coupon field detection and fill module 260 searches around the coupon code field to gather contextual data (step 320) and to collect field metadata (step 325). It verifies that the field is visible to the user using various algorithms (step 330). The coupon field detection and fill module 260 collates the data and generates a payload for every webpage having a fillable field (step 335).

The payload is then sent to the autofill manager 250, which passes it to the mapping module 270. The mapping module 270 handles the mapping process in three stages: preprocess, mapping, and post-process. Within the preprocess stage, the mapping module 270 receives the payload (e.g., in JSON), filters and sanitizes the field data (step 350), and performs pre-process data transformation (step 355). In certain embodiments, the preprocess stage also includes language translation so that the automatic coupon code fill functions with non-English websites.

Within the mapping stage, the mapping module 270 builds and prunes the webpage tree (step 360). In certain embodiments, this is done by collecting data from the webpage and building a webpage tree whose structure is similar to the webpage but contains only relevant information from the webpage. In certain embodiments, the mapping process includes an algorithm that identifies other labels similar to the coupon code field (e.g., “voucher,” “discount code,” etc.) to include as relevant information. The mapping module 270 searches the tree and scores nodes (step 365). In certain embodiments, this is done by traversing the webpage tree and assigning a score to each node, which represents how relevant the information from the webpage is to the current context and how well the system identified it. The mapping module 270 validates the results to confirm that the scoring is correct without collisions (step 370).

In the post-process stage, the mapping module 270 clusters fields to ensure that any fields that need to be concatenated (e.g., first name and last name into full name) or put into a specific format is performed (step 375). The mapping module 270 verifies that the results payload is correct using a heuristic approach combined with a scoring validation (step 380).

The results are then sent to the autofill manager 250, which passes them back to the coupon field detection and fill module 260, which performs the coupon test and fill process. Within the coupon test and fill process, the coupon field detection and fill module 260 finds a coupon code field using the mapping results (step 382), tests coupon(s) in the coupon code field (step 384), applies the best coupon in the coupon code field (step 386), and sends a message that the autofill is complete (step 388).

3. GENERAL

The methods described with respect to FIGS. 1-3 are embodied in software and performed by a computer system (comprising one or more computing device(s)) executing the software. A person skilled in the art would understand that a computer system has one or more memory unit(s), disks, or other physical, computer-readable storage media for storing software instructions, as well as one or more processor(s) for executing the software instructions.

As will be understood by those familiar with the art, the invention may be embodied in other specific forms without departing from the spirit or essential characteristics thereof. Accordingly, the above disclosure is intended to be illustrative, but not limiting, of the scope of the invention, which is set forth in the following claims. 

1. A method performed by a computer system for automatic coupon code fill in a mobile application, the method comprising: the mobile application launching a software module for analyzing a WebView of a mobile application; the mobile application injecting the software module into a webpage in the WebView; the software module identifying a checkout page in a WebView of a mobile application; the software module extracting field data from the checkout page in the WebView of the mobile application; identifying a coupon code field and a cart total field from the field data, wherein identifying a coupon code field and a cart total field from the field data comprises: the software module generating a payload with the extracted field data, the mobile application sending the payload to a server, wherein the server maps the field data in the payload to one or more field parameter(s), wherein a field parameter is a value that indicates a field type, and wherein the server mapping the field data in the payload to one or more field parameter(s) comprises: filtering and sanitizing the field data, performing pre-process data transformation, building and pruning a webpage tree, searching the webpage tree and scoring one or more nodes; validating results of the scoring, clustering fields and performing any needed concatenation or formatting of fields, and verifying results payload using heuristics and scoring validation, the server returning the field parameter mappings to the mobile application, and the software module using the field parameter mappings to find the coupon code field and the cart total field on the webpage; obtaining one or more coupon code(s); the software module testing the one or more coupon code(s) in the checkout page in the WebView of the mobile application, wherein the one or more coupon code(s) are tested in the identified coupon code field to determine whether any of the coupon code(s) cause the value associated with the cart total field to decrease; in response to one or more coupon code(s) providing a reward on the checkout page, the software module identifying a best coupon code; and the software module inserting the best coupon code in the identified coupon code field in the checkout page in the mobile application.
 2. (canceled)
 3. (canceled)
 4. (canceled)
 5. The method of claim 1, wherein extracting field data comprises: creating an object model of the webpage; searching for labels associated with the coupon code and cart total fields to identify potential coupon code and cart total fields, wherein the search is performed using the object model and the webpage; gathering contextual data around the identified fields; collecting metadata for the identified fields; verifying the identified fields are visible to the user; and generating a payload with the contextual data and metadata for the identified fields.
 6. (canceled)
 7. The method of claim 1, wherein the mapping process comprises: extracting metadata from the extracted field data from the checkout page; creating a payload of the metadata; uploading the payload of the metadata to a server; generating field parameters from the payload of the metadata; and returning the field parameters as a results payload.
 8. The method of claim 1, further comprising displaying the coupon code(s) being tested.
 9. The method of claim 1, further comprising displaying an amount saved in the mobile application after inserting the best coupon code in the identified coupon code field.
 10. The method of claim 1, wherein identifying the coupon code and cart total fields comprises: creating a vector representation of each field in the field data; applying a neural network to the vector representations of the fields in the field data; and obtaining a predicted coupon code field and cart total field from the neural network.
 11. A non-transitory computer-readable medium comprising a computer program, that, when executed by a computer system, enables the computer system to perform the following steps for automatic coupon code fill in a mobile application, the steps comprising: the mobile application launching a software module for analyzing a WebView of a mobile application; the mobile application injecting the software module into a webpage in the WebView; the software module identifying a checkout page in a WebView of a mobile application; the software module extracting field data from the checkout page in the WebView of the mobile application; identifying a coupon code field and a cart total field from the field data, wherein identifying a coupon code field and a cart total field from the field data comprises: the software module generating a payload with the extracted field data, the mobile application sending the payload to a server, wherein the server maps the field data in the payload to one or more field parameter(s), wherein a field parameter is a value that indicates a field type, and wherein the server mapping the field data in the payload to one or more field parameter(s) comprises: filtering and sanitizing the field data, performing pre-process data transformation, building and pruning a webpage tree, searching the webpage tree and scoring one or more nodes: validating results of the scoring, clustering fields and performing any needed concatenation or formatting of fields, and verifying results payload using heuristics and scoring validation, the server returning the field parameter mappings to the mobile application, and the software module using the field parameter mappings to find the coupon code field and the cart total field on the webpage; obtaining one or more coupon code(s); the software module testing the one or more coupon code(s) in the checkout page in the WebView of the mobile application, wherein the one or more coupon code(s) are tested in the identified coupon code field to determine whether any of the coupon code(s) cause the value associated with the cart total field to decrease; in response to one or more coupon code(s) providing a reward on the checkout page, the software module identifying a best coupon code; and the software module inserting the best coupon code in the identified coupon code field in the checkout page in the mobile application.
 12. (canceled)
 13. (canceled)
 14. (canceled)
 15. The non-transitory computer-readable medium of claim 11, wherein extracting field data comprises: creating an object model of the webpage; searching for labels associated with the coupon code and cart total fields to identify potential coupon code and cart total fields, wherein the search is performed using the object model and the webpage; gathering contextual data around the identified fields; collecting metadata for the identified fields; verifying the identified fields are visible to the user; and generating a payload with the contextual data and metadata for the identified fields.
 16. (canceled)
 17. The non-transitory computer-readable medium of claim 11, wherein the mapping process comprises: extracting metadata from the extracted field data from the checkout page; creating a payload of the metadata; uploading the payload of the metadata to a server; generating field parameters from the payload of the metadata; and returning the field parameters as a results payload.
 18. The non-transitory computer-readable medium of claim 11, further comprising displaying the coupon code(s) being tested.
 19. The non-transitory computer-readable medium of claim 11, further comprising displaying an amount saved in the mobile application after inserting the best coupon code in the identified coupon code field.
 20. The non-transitory computer-readable medium of claim 11, wherein identifying the coupon code and cart total fields comprises: creating a vector representation of each field in the field data; applying a neural network to the vector representations of the fields in the field data; and obtaining a predicted coupon code field and cart total field from the neural network.
 21. A computer system for automatic coupon code fill in a mobile application, the system comprising: one or more processor(s); one or more memory unit(s) coupled to the one or more processor(s), wherein the one or more memory unit(s) store instructions that, when executed by the one or more processor(s), cause the system to perform the operations of: the mobile application launching a software module for analyzing a WebView of a mobile application; the mobile application injecting the software module into a webpage in the WebView; the software module identifying a checkout page in a WebView of a mobile application; the software module extracting field data from the checkout page in the WebView of the mobile application; identifying a coupon code field and a cart total field from the field data, wherein identifying a coupon code field and a cart total field from the field data comprises: the software module generating a payload with the extracted field data, the mobile application sending the payload to a server, wherein the server maps the field data in the payload to one or more field parameter(s), wherein a field parameter is a value that indicates a field type, and wherein the server mapping the field data in the payload to one or more field parameter(s) comprises: filtering and sanitizing the field data, performing pre-process data transformation, building and pruning a webpage tree, searching the webpage tree and scoring one or more nodes; validating results of the scoring, clustering fields and performing any needed concatenation or formatting of fields, and verifying results payload using heuristics and scoring validation, the server returning the field parameter mappings to the mobile application, and the software module using the field parameter mappings to find the coupon code field and the cart total field on the webpage; obtaining one or more coupon code(s); the software module testing the one or more coupon code(s) in the checkout page in the WebView of the mobile application, wherein the one or more coupon code(s) are tested in the identified coupon code field to determine whether any of the coupon code(s) cause the value associated with the cart total field to decrease; in response to one or more coupon code(s) providing a reward on the checkout page, the software module identifying a best coupon code; and the software module inserting the best coupon code in the identified coupon code field in the checkout page in the mobile application.
 22. The system of claim 21, wherein extracting field data comprises: creating an object model of the webpage; searching for labels associated with the coupon code and cart total fields to identify potential coupon code and cart total fields, wherein the search is performed using the object model and the webpage; gathering contextual data around the identified fields; collecting metadata for the identified fields; verifying the identified fields are visible to the user; and generating a payload with the contextual data and metadata for the identified fields.
 23. The system of claim 21, wherein the mapping process comprises: extracting metadata from the extracted field data from the checkout page; creating a payload of the metadata; uploading the payload of the metadata to a server; generating field parameters from the payload of the metadata; and returning the field parameters as a results payload.
 24. The system of claim 21, further comprising displaying the coupon code(s) being tested.
 25. The system of claim 21, further comprising displaying an amount saved in the mobile application after inserting the best coupon code in the identified coupon code field.
 26. The system of claim 21, wherein identifying the coupon code and cart total fields comprises: creating a vector representation of each field in the field data; applying a neural network to the vector representations of the fields in the field data; and obtaining a predicted coupon code field and cart total field from the neural network. 